package com.venusj.test;

import com.venusj.service.HelloService;
import org.apache.dubbo.common.extension.ExtensionLoader;

import java.util.Set;

/**
 * @author venusj
 * @date 2020/12/7
 */
public class DemoMain {
    public static void main(String[] args) {
        // 获取扩展加载器
        ExtensionLoader<HelloService> extensionLoader = ExtensionLoader.getExtensionLoader(HelloService.class);

        // 便利所有的支持的扩展点  META-INF.dubbo
        Set<HelloService> extensionInstances = extensionLoader.getSupportedExtensionInstances();
        for (HelloService helloService : extensionInstances)
        {
            String result = helloService.sayHello();
            System.out.println("输出：" + result );
        }
    }
}
